package org.qydjk.common.pojo;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;

/**
 * Created by Administrator on 2017/12/13 0013.
 */
@Entity
@Table(name = "qy_user", schema = "qydjk", catalog = "")
public class User {
    private Integer id;
    private String username;
    private String pwd;
    private String payPwd;
    private String phone;
    private String email;
    private String nickname;
    private String trueName;
    private Date birthday;
    private String province;
    private Integer provinceId;
    private String city;
    private Integer cityId;
    private String area;
    private Integer areaId;
    private String address;
    private Integer sex;
    private Integer age;
    private String headurl;
    private String regIp;
    private Date regTime;
    private String lastLoginIp;
    private Date lastLoginTime;
    private Integer failLoginCount;
    private BigDecimal money;
    private String openid;
    private Integer type;
    private Integer status;
    private Date createTime;
    private Date updateTime;

    private Integer productCollectNum;
    private Integer sellerCollectNum;
    private Integer articleCollectNum;
    private Integer historyNum;


    @Id
    @Column(name = "id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Basic
    @Column(name = "username")
    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    @Basic
    @Column(name = "pwd")
    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    @Basic
    @Column(name = "pay_pwd")
    public String getPayPwd() {
        return payPwd;
    }

    public void setPayPwd(String payPwd) {
        this.payPwd = payPwd;
    }

    @Basic
    @Column(name = "phone")
    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    @Basic
    @Column(name = "email")
    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    @Basic
    @Column(name = "nickname")
    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    @Basic
    @Column(name = "true_name")
    public String getTrueName() {
        return trueName;
    }

    public void setTrueName(String trueName) {
        this.trueName = trueName;
    }

    @Basic
    @Column(name = "birthday")
    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    @Basic
    @Column(name = "province")
    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    @Basic
    @Column(name = "province_id")
    public Integer getProvinceId() {
        return provinceId;
    }

    public void setProvinceId(Integer provinceId) {
        this.provinceId = provinceId;
    }

    @Basic
    @Column(name = "city")
    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    @Basic
    @Column(name = "city_id")
    public Integer getCityId() {
        return cityId;
    }

    public void setCityId(Integer cityId) {
        this.cityId = cityId;
    }

    @Basic
    @Column(name = "area")
    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
    }

    @Basic
    @Column(name = "area_id")
    public Integer getAreaId() {
        return areaId;
    }

    public void setAreaId(Integer areaId) {
        this.areaId = areaId;
    }

    @Basic
    @Column(name = "address")
    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    @Basic
    @Column(name = "sex")
    public Integer getSex() {
        return sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }

    @Basic
    @Column(name = "age")
    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    @Basic
    @Column(name = "headurl")
    public String getHeadurl() {
        return headurl;
    }

    public void setHeadurl(String headurl) {
        this.headurl = headurl;
    }

    @Basic
    @Column(name = "reg_ip")
    public String getRegIp() {
        return regIp;
    }

    public void setRegIp(String regIp) {
        this.regIp = regIp;
    }

    @Basic
    @Column(name = "reg_time")
    public Date getRegTime() {
        return regTime;
    }

    public void setRegTime(Date regTime) {
        this.regTime = regTime;
    }

    @Basic
    @Column(name = "last_login_ip")
    public String getLastLoginIp() {
        return lastLoginIp;
    }

    public void setLastLoginIp(String lastLoginIp) {
        this.lastLoginIp = lastLoginIp;
    }

    @Basic
    @Column(name = "last_login_time")
    public Date getLastLoginTime() {
        return lastLoginTime;
    }

    public void setLastLoginTime(Date lastLoginTime) {
        this.lastLoginTime = lastLoginTime;
    }

    @Basic
    @Column(name = "fail_login_count")
    public Integer getFailLoginCount() {
        return failLoginCount;
    }

    public void setFailLoginCount(Integer failLoginCount) {
        this.failLoginCount = failLoginCount;
    }

    @Basic
    @Column(name = "money")
    public BigDecimal getMoney() {
        return money;
    }

    public void setMoney(BigDecimal money) {
        this.money = money;
    }

    @Basic
    @Column(name = "openid")
    public String getOpenid() {
        return openid;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }

    @Basic
    @Column(name = "type")
    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    @Basic
    @Column(name = "status")
    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    @Basic
    @Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "update_time")
    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Basic
    @Column(name = "product_collect_num")
    public Integer getProductCollectNum() {
        return productCollectNum;
    }

    public void setProductCollectNum(Integer productCollectNum) {
        this.productCollectNum = productCollectNum;
    }

    @Basic
    @Column(name = "seller_collect_num")
    public Integer getSellerCollectNum() {
        return sellerCollectNum;
    }

    public void setSellerCollectNum(Integer sellerCollectNum) {
        this.sellerCollectNum = sellerCollectNum;
    }


    @Basic
    @Column(name = "article_collect_num")
    public Integer getArticleCollectNum() {
        return articleCollectNum;
    }

    public void setArticleCollectNum(Integer articleCollectNum) {
        this.articleCollectNum = articleCollectNum;
    }

    @Basic
    @Column(name = "history_num")
    public Integer getHistoryNum() {
        return historyNum;
    }

    public void setHistoryNum(Integer historyNum) {
        this.historyNum = historyNum;
    }

    @Override
    public boolean equals(Object object) {
        if (this == object) return true;
        if (object == null || getClass() != object.getClass()) return false;

        User qyUser = (User) object;

        if (id != qyUser.id) return false;
        if (username != null ? !username.equals(qyUser.username) : qyUser.username != null) return false;
        if (pwd != null ? !pwd.equals(qyUser.pwd) : qyUser.pwd != null) return false;
        if (payPwd != null ? !payPwd.equals(qyUser.payPwd) : qyUser.payPwd != null) return false;
        if (phone != null ? !phone.equals(qyUser.phone) : qyUser.phone != null) return false;
        if (email != null ? !email.equals(qyUser.email) : qyUser.email != null) return false;
        if (nickname != null ? !nickname.equals(qyUser.nickname) : qyUser.nickname != null) return false;
        if (trueName != null ? !trueName.equals(qyUser.trueName) : qyUser.trueName != null) return false;
        if (birthday != null ? !birthday.equals(qyUser.birthday) : qyUser.birthday != null) return false;
        if (province != null ? !province.equals(qyUser.province) : qyUser.province != null) return false;
        if (provinceId != null ? !provinceId.equals(qyUser.provinceId) : qyUser.provinceId != null) return false;
        if (city != null ? !city.equals(qyUser.city) : qyUser.city != null) return false;
        if (cityId != null ? !cityId.equals(qyUser.cityId) : qyUser.cityId != null) return false;
        if (area != null ? !area.equals(qyUser.area) : qyUser.area != null) return false;
        if (areaId != null ? !areaId.equals(qyUser.areaId) : qyUser.areaId != null) return false;
        if (address != null ? !address.equals(qyUser.address) : qyUser.address != null) return false;
        if (sex != null ? !sex.equals(qyUser.sex) : qyUser.sex != null) return false;
        if (age != null ? !age.equals(qyUser.age) : qyUser.age != null) return false;
        if (headurl != null ? !headurl.equals(qyUser.headurl) : qyUser.headurl != null) return false;
        if (regIp != null ? !regIp.equals(qyUser.regIp) : qyUser.regIp != null) return false;
        if (regTime != null ? !regTime.equals(qyUser.regTime) : qyUser.regTime != null) return false;
        if (lastLoginIp != null ? !lastLoginIp.equals(qyUser.lastLoginIp) : qyUser.lastLoginIp != null) return false;
        if (lastLoginTime != null ? !lastLoginTime.equals(qyUser.lastLoginTime) : qyUser.lastLoginTime != null)
            return false;
        if (failLoginCount != null ? !failLoginCount.equals(qyUser.failLoginCount) : qyUser.failLoginCount != null)
            return false;
        if (money != null ? !money.equals(qyUser.money) : qyUser.money != null) return false;
        if (openid != null ? !openid.equals(qyUser.openid) : qyUser.openid != null) return false;
        if (type != null ? !type.equals(qyUser.type) : qyUser.type != null) return false;
        if (status != null ? !status.equals(qyUser.status) : qyUser.status != null) return false;
        if (createTime != null ? !createTime.equals(qyUser.createTime) : qyUser.createTime != null) return false;
        if (updateTime != null ? !updateTime.equals(qyUser.updateTime) : qyUser.updateTime != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id;
        result = 31 * result + (username != null ? username.hashCode() : 0);
        result = 31 * result + (pwd != null ? pwd.hashCode() : 0);
        result = 31 * result + (payPwd != null ? payPwd.hashCode() : 0);
        result = 31 * result + (phone != null ? phone.hashCode() : 0);
        result = 31 * result + (email != null ? email.hashCode() : 0);
        result = 31 * result + (nickname != null ? nickname.hashCode() : 0);
        result = 31 * result + (trueName != null ? trueName.hashCode() : 0);
        result = 31 * result + (birthday != null ? birthday.hashCode() : 0);
        result = 31 * result + (province != null ? province.hashCode() : 0);
        result = 31 * result + (provinceId != null ? provinceId.hashCode() : 0);
        result = 31 * result + (city != null ? city.hashCode() : 0);
        result = 31 * result + (cityId != null ? cityId.hashCode() : 0);
        result = 31 * result + (area != null ? area.hashCode() : 0);
        result = 31 * result + (areaId != null ? areaId.hashCode() : 0);
        result = 31 * result + (address != null ? address.hashCode() : 0);
        result = 31 * result + (sex != null ? sex.hashCode() : 0);
        result = 31 * result + (age != null ? age.hashCode() : 0);
        result = 31 * result + (headurl != null ? headurl.hashCode() : 0);
        result = 31 * result + (regIp != null ? regIp.hashCode() : 0);
        result = 31 * result + (regTime != null ? regTime.hashCode() : 0);
        result = 31 * result + (lastLoginIp != null ? lastLoginIp.hashCode() : 0);
        result = 31 * result + (lastLoginTime != null ? lastLoginTime.hashCode() : 0);
        result = 31 * result + (failLoginCount != null ? failLoginCount.hashCode() : 0);
        result = 31 * result + (money != null ? money.hashCode() : 0);
        result = 31 * result + (openid != null ? openid.hashCode() : 0);
        result = 31 * result + (type != null ? type.hashCode() : 0);
        result = 31 * result + (status != null ? status.hashCode() : 0);
        result = 31 * result + (createTime != null ? createTime.hashCode() : 0);
        result = 31 * result + (updateTime != null ? updateTime.hashCode() : 0);
        return result;
    }
}
